import { getRequest, postRequest } from "@/lib/axios";
import {
  MERPAYLIST,
  MERPAYADD,
  MERPAYUPDATE,
  MERPAYDELETE,
  PAYMERLIST,
  PAYMERADD,
  PAYMERUPDATE,
  PAYMERFROZEN,
  PAYMERUSERLIST,
  MERCHANTKYCLIST,
  MERCHANTKYCUPDATE,
  MERCHANTKYCAUDIT,
  MERPAYSELECT,
  MERCHANTCURRENCYLIST,
} from "@/config/api-constant/ExAssistant";

//商户相关接口

//商户支付渠道列表
export const merPayListApi = (param, type) => {
  return getRequest(MERPAYLIST, param, type);
};

//分配支付渠道
export const merPayAddApi = (param) => {
  return postRequest(MERPAYADD, param);
};
//更新
export const merPayUpdateApi = (param) => {
  return postRequest(MERPAYUPDATE, param);
};
//删除
export const merPayDeleteApi = (param) => {
  return postRequest(MERPAYDELETE, param);
};

//商户列表（用户下拉框，选择框等）
export const merchantSelectApi = (param) => {
  return getRequest(MERPAYSELECT, param);
};
//商户列表
export const MerListApi = (param, type) => {
  return getRequest(PAYMERLIST, param, type);
};
//新增商户
export const payMerAddApi = (param) => {
  return postRequest(PAYMERADD, param);
};
//更新商户
export const payMerUpdateApi = (param) => {
  return postRequest(PAYMERUPDATE, param);
};
//冻结商户
export const payMerFrozenApi = (param) => {
  return postRequest(PAYMERFROZEN, param);
};
//查看商户收单信息
export const merchantAcquiringInfoApi = (param) => {
  return postRequest("/exassistant/mer_acquiring", param);
};
//商户下用户列表
export const payMerUserListApi = (param, type) => {
  return postRequest(PAYMERUSERLIST, param, type);
};

//商户KYC资料管理
export const merchantKycListApi = (param, type) => {
  return getRequest(MERCHANTKYCLIST, param, type);
};

//商户KYC资料新增、编辑
export const merchantKycUpdateApi = (param) => {
  return postRequest(MERCHANTKYCUPDATE, param);
};

//商户KYC资料审核
export const merchantKycAuditApi = (param) => {
  return postRequest(MERCHANTKYCAUDIT, param);
};

//商户币种列表
export const merchantCurrencyApi = (param) => {
  return getRequest(MERCHANTCURRENCYLIST, param);
};

//商户币种新增编辑
export const merchantCurrencyChangeApi = (param) => {
  return postRequest(MERCHANTCURRENCYLIST, param);
};
